#include <stdio.h>


void QuickSort(int *arr, int n);
void Swap(int  *a , int *b);
void HeapSort(int *arr, int n);
// int AddTail(ListHead pHead, NodeValue data);
// void PrintList(ListHead pHead);

#define  MAX(a,b) ((a)>(b))?(a):(b);
#define  MIN(a,b) ((a)<(b))?(a):(b);

int main()
{
    // ListHead pHead = NULL;
    // AddTail(pHead, 12);
    // AddTail(pHead, 2);
    // AddTail(pHead, 92);
    // AddTail(pHead, 72);
    // PrintList(pHead);
    // return 0;
    int a[] = {1,4,3,2,5,7,6,12,10};
    printf("排序前");
    for (int i = 0; i < 9; i++)
    {
        printf("%d,",  a[i]);
        
    }
    HeapSort(a, 5);
    printf("\n排序后");

    for (int i = 0; i < 9; i++)
    {
        printf("%d,",  a[i]);
        
    }
    printf("\n");
    return 0;
}



void Swap(int  *a , int *b)
{
    int tmp;
    tmp = *a;
    *a = *b;
    *b = tmp;
    return;
}


